home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / dbus.preinst < prev    next >
Text File  |  2009-10-23  |  1KB  |  44 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. rm_conffile() {
  6.   CONFFILE="$1"
  7.   OLD_MD5SUM="$2"
  8.   if [ -e "$CONFFILE" ]; then
  9.    md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
  10.    if [ "$md5sum" != "$OLD_MD5SUM" ]; then
  11.      echo "Obsolete conffile $CONFFILE has been modified by you."
  12.      echo "Saving as $CONFFILE.dpkg-bak ..."
  13.      mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
  14.    else
  15.      echo "Removing obsolete conffile $CONFFILE ..."
  16.      rm -f "$CONFFILE"
  17.    fi
  18.  fi
  19. }
  20.  
  21. case "$1" in
  22. install|upgrade)
  23.   if dpkg --compare-versions "$2" lt "0.50-2"; then
  24.     rm_conffile "/etc/X11/Xsession.d/75dbus-1-utils_dbus-launch" f16c15c4b018d37ca3ea2b6aba224439
  25.   fi
  26. esac
  27.  
  28. # Automatically added by dh_installinit
  29. if [ "$1" = install ] || [ "$1" = upgrade ]; then
  30.     if [ -e "/etc/init.d/dbus" ] && [ ! -L "/etc/init.d/dbus" ]; then
  31.         if [ "`md5sum \"/etc/init.d/dbus\" | sed -e \"s/ .*//\"`" != \
  32.              "`dpkg-query -W -f='${Conffiles}' dbus | sed -n -e \"\\\\' /etc/init.d/dbus '{s/ obsolete$//;s/.* //p}\"`" ]
  33.         then
  34.             echo "Obsolete conffile /etc/init.d/dbus has been modified by you, renaming to .dpkg-bak"
  35.             mv -f "/etc/init.d/dbus" "/etc/init.d/dbus.dpkg-bak"
  36.         else
  37.             rm -f "/etc/init.d/dbus"
  38.         fi
  39.     fi
  40. fi
  41. # End automatically added section
  42.  
  43.  
  44.